<div class="modal-header">
    <h3 class="modal-title"><b style="color: #286090">新增主机监控</b></h3>
</div>
<div class="modal-body">
    <div style="margin-top: 5px;">
        <form class="form-horizontal">
            <div class="form-group ">
                <div class="col-md-6">
                    <label class="col-lg-4 control-label">Host</label>
                    <div class="col-lg-8">
                        <input type="text" class="form-control" placeholder="Zabbix监控主机的名称"
                               ng-model="zabbixHost.host">
                    </div>
                </div>

                <div class="col-md-6">
                    <label class="col-lg-4 control-label">IP</label>
                    <div class="col-lg-8">
                        <input type="text" class="form-control" placeholder="Zabbix监控主机的IP"
                               ng-model="zabbixHost.ip">
                    </div>
                </div>
            </div>

            <div class="panel panel-default" style="margin-top: 5px;;">
                <div class="panel-heading">
                    <b style="color: #286090">启用的模版列表</b>
                </div>


                <div class="panel-body">
                    <div>
                        <table class="table table-hover table-bordered table-striped">
                            <thead>
                            <tr>
                                <td>选择</td>
                                <td>模版名称</td>
                                <td>模版ID</td>
                            </tr>
                            </thead>
                            <tbody>
                            <tr ng-repeat="item in zabbixHost.templates">
                                <td><input type="checkbox" ng-model="item.choose"></td>
                                <td>
                                    <b style="color: #777">{{item.templateName}}</b>
                                </td>
                                <td>
                                    {{item.templateid}}
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <div class="col-md-6">
                    <label class="col-lg-4 control-label">代理服务器</label>

                    <div class="checkbox col-lg-8">
                        <label>
                            <input type="checkbox" ng-model="zabbixHost.useProxy"><b
                                style="color: #286090">启用</b>
                        </label>
                    </div>
                </div>

                <div class="col-md-6" ng-show="zabbixHost.useProxy">
                    <label class="col-lg-4 control-label"><span style="color: #ec2121;">*</span>选择代理</label>
                    <div class="col-lg-8">
                        <select class="form-control" ng-model="nowProxy.selected"
                                ng-options="proxy as proxy.host for proxy in zabbixHost.proxys" required>
                            <option value="">--请选择--</option>
                        </select>
                    </div>
                </div>


            </div>
        </form>
    </div>


    <!--按钮-->


    <div class="form-group" style="text-align:center;">

        <button ng-click="addHost()" ng-show="btnAddHost"
                class="btn btn-xs"
                style="margin-left: 20px; background-color: #2e6da4; color: white;">
            <span class="glyphicon glyphicon-plus"></span>添加
        </button>

        <button ng-click="closeModal()"
                class="btn btn-xs"
                style="margin-left: 20px; background-color: #d78700; color: white;">
            <span class="glyphicon glyphicon-remove"></span>关闭
        </button>

    </div>


    <div ng-if="alert.type != ''">
        <div uib-alert ng-class="'alert-' + alert.type" close="closeAlert()">{{alert.msg}}</div>
    </div>


</div>